<?php
/**
 * @Name
 * @Description
 * @Author 峰峰剥壳
 * @Date 2022/3/15 22:01
 */

namespace app\api\controller;

use think\facade\Db;

class Swiper
{
    public function index()
    {
        $data = Db::name('swiper')->where('is_show',1)->select()->toArray();
        if ($data){
            return json(['code'=>200,'msg'=>'success','data'=>$data]);
        }else{
            return json(['code'=>440,'msg'=>'no swiper']);
        }
    }
}